package com.zq.shuatiba.constant;

/**
 * redis常量
 * @author zq
 */
public interface RedisConstant {
    /**
     * 用户签到记录key前缀
     */
    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signIns:";

    /**
     * 获取用户签到记录key
     * @param year
     * @param userId
     * @return
     */
    static String getUserSignInRedisKey(int year,Long userId) {
        return String.format("%s:%s:%s", USER_SIGN_IN_REDIS_KEY_PREFIX, year, userId);
    }
}
